xen/sched: fix credit2 smt idle handling
authorJuergen Gross <jgross@suse.com>
Wed, 15 May 2019 07:45:58 +0000 (09:45 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 15 May 2019 07:45:58 +0000 (09:45 +0200)
commit6afaac227541df272e9793c2f3af9c2e3a2e39f9
tree0ef0e5f932043226df661b33689988fc137880c7
parenta6e07495c17158a01884a251b43c824926c60803
xen/sched: fix credit2 smt idle handling

Credit2's smt_idle_mask_set() and smt_idle_mask_clear() are used to
identify idle cores where vcpus can be moved to. A core is thought to
be idle when all siblings are known to have the idle vcpu running on
them.

Unfortunately the information of a vcpu running on a cpu is per
runqueue. So in case not all siblings are in the same runqueue a core
will never be regarded to be idle, as the sibling not in the runqueue
is never known to run the idle vcpu.

Use a credit2 specific cpumask of siblings with only those cpus
being marked which are in the same runqueue as the cpu in question.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
master commit: 753ba43d6d16e688f688e01e1c77463ea2c6ec9f
master date: 2019-03-29 18:28:21 +0000
xen/common/sched_credit2.c